package com.crm.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.crm.domain.Notice;
import com.crm.mapper.NoticeMpper;
import com.crm.service.NoticeService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
@Slf4j

public class NoticeServiceImpl extends ServiceImpl<NoticeMpper, Notice> implements NoticeService {
    @Autowired
    private NoticeMpper noticeMapper;

    @Override
    public Page<Notice> selectBylist(String status, int pageNum, int pageSize) {
        Page<Notice> page = new Page<>(pageNum, pageSize);
        return noticeMapper.selectPage(page, status); // 使用 MyBatis Plus 分页查询
    }


}
